package com.heima.web.action;

import java.io.IOException;

import javax.annotation.Resource;

import org.apache.struts2.ServletActionContext;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.heima.domain.Staff;
import com.heima.serviceInterface.IStaffService;
@Controller
@Scope("prototype")
public class StaffAction extends BaseAction<Staff> {
	@Resource
	private IStaffService staffService;
	public String save(){
		try {
			staffService.save(model);
			ServletActionContext.getResponse().getWriter().print(1);
		} catch (IOException e) {
			
			e.printStackTrace();
		}
		return NONE;
	}
	
	public String pageList(){
		staffService.pageBeanQuery(pageBean);
		pageBeanQuery(new String[] {"decidezones","currentPage","pageSize","Criteria"});
		return NONE;
	}
}
